// 关怀模式处理
import {mapState,mapMutations} from 'vuex'
export default {
	data:function(){
		return{
			isNormal: true
		}
	},
	computed:{
		...mapState(['isNormalX'])
	},
	onShow(){
		// vuex中获取数据
		this.isNormal = this.isNormalX;
		console.log(this.isNormal);
	},
	methods:{
		...mapMutations(['setStateAttr']),
		changeNormal(){
			this.isNormal = !this.isNormal;
			// 设置Vuex
			this.setStateAttr({'key':'isNormalX','val': this.isNormal})
		},
	}
}
